package com.linsir.file.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.linsir.core.entity.BaseEntity;
import jakarta.validation.constraints.NotNull;
import lombok.Data;
import org.hibernate.validator.constraints.Length;


/**
 * @author ：linsir
 * @date ：Created in 2022/9/15 1:38
 * @description：实体类
 * @modified By：
 * @version:
 */
@Data
@TableName("upload_file")
public class UploadFile extends BaseEntity {


    /**
     * 应用模块
     */
    private String appModule;

    //@NotNull(message = "关联对象类不能为空！")
    private String relObjType = null;

    //@NotNull(message = "关联对象ID不能为空！")
    private String relObjId;

    //@NotNull(message = "关联对象属性不能为空！")
    private String relObjField;

    @NotNull(message = "文件名不能为空！")
    @Length(max = 100, message = "文件名长度超出了最大限制！")
    private String fileName;

    private String storagePath;

    /**
     * 访问URL
     */
    //@TableField
    private String accessUrl;

    //@TableField
    private String fileType;

    /**
     * 文件包含记录数
     */
    //@TableField
    private int dataCount = 0;

    //@TableField
    @Length(max = 100, message = "备注长度超出了最大限制！")
    private String description;
}
